NanoPBOptions

This is the inner options message, which basically defines options for
a field. When it is used in message or file scope, it applies to all
fields.
Protobuf type NanoPBOptions

Types

Link copied to clipboard
class Builder : GeneratedMessage.Builder<BuilderT> , Nanopb.NanoPBOptionsOrBuilder
This is the inner options message, which basically defines options for
a field. When it is used in message or file scope, it applies to all
fields.
Protobuf type NanoPBOptions

Properties

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard

Functions

Link copied to clipboard
open fun equals(obj: Any): Boolean
Link copied to clipboard
decode oneof as anonymous union
optional bool anonymous_oneof = 11 [default = false];
Link copied to clipboard
Data type for storage associated with callback fields.
optional string callback_datatype = 18 [default = "pb_callback_t"];
Link copied to clipboard
open fun getCallbackDatatypeBytes(): ByteString
Data type for storage associated with callback fields.
optional string callback_datatype = 18 [default = "pb_callback_t"];
Link copied to clipboard
Callback function used for encoding and decoding.
Prior to nanopb-0.4.0, the callback was specified in per-field pb_callback_t
structure. This is still supported, but does not work inside e.g. oneof or pointer
fields. Instead, a new method allows specifying a per-message callback that
will be called for all callback fields in a message type.
optional string callback_function = 19 [default = "pb_default_field_callback"];
Link copied to clipboard
open fun getCallbackFunctionBytes(): ByteString
Callback function used for encoding and decoding.
Prior to nanopb-0.4.0, the callback was specified in per-field pb_callback_t
structure. This is still supported, but does not work inside e.g. oneof or pointer
fields. Instead, a new method allows specifying a per-message callback that
will be called for all callback fields in a message type.
optional string callback_function = 19 [default = "pb_default_field_callback"];
Link copied to clipboard
Set default value for has_ fields.
optional bool default_has = 23 [default = false];
Link copied to clipboard
Link copied to clipboard
fun getDescriptor(): Descriptors.Descriptor
Link copied to clipboard
Select the size of field descriptors. This option has to be defined
for the whole message, not per-field. Usually automatic selection is
ok, but if it results in compilation errors you can increase the field
size here.
optional .DescriptorSize descriptorsize = 20 [default = DS_AUTO];
Link copied to clipboard
Generate an enum->string mapping function (can take up lots of space).
optional bool enum_to_string = 13 [default = false];
Link copied to clipboard
open fun getExclude(index: Int): String
Automatic includes to exclude from generated `.pb.h`
Same as nanopb_generator.py command line flag -x.
repeated string exclude = 26;
Link copied to clipboard
open fun getExcludeBytes(index: Int): ByteString
Automatic includes to exclude from generated `.pb.h`
Same as nanopb_generator.py command line flag -x.
repeated string exclude = 26;
Link copied to clipboard
open fun getExcludeCount(): Int
Automatic includes to exclude from generated `.pb.h`
Same as nanopb_generator.py command line flag -x.
repeated string exclude = 26;
Link copied to clipboard
open fun getExcludeList(): ProtocolStringList
Automatic includes to exclude from generated `.pb.h`
Same as nanopb_generator.py command line flag -x.
repeated string exclude = 26;
Link copied to clipboard
Set the FT_DEFAULT field conversion strategy.
A field that can become a static member of a c struct (e.g. int, bool, etc)
will be a a static field.
Fields with dynamic length are converted to either a pointer or a callback.
optional .FieldType fallback_type = 29 [default = FT_CALLBACK];
Link copied to clipboard
Generate repeated field with fixed count
optional bool fixed_count = 16 [default = false];
Link copied to clipboard
Generate bytes arrays with fixed length
optional bool fixed_length = 15 [default = false];
Link copied to clipboard
open fun getInclude(index: Int): String
Extra files to include in generated `.pb.h`
repeated string include = 24;
Link copied to clipboard
open fun getIncludeBytes(index: Int): ByteString
Extra files to include in generated `.pb.h`
repeated string include = 24;
Link copied to clipboard
open fun getIncludeCount(): Int
Extra files to include in generated `.pb.h`
repeated string include = 24;
Link copied to clipboard
open fun getIncludeList(): ProtocolStringList
Extra files to include in generated `.pb.h`
repeated string include = 24;
Link copied to clipboard
Size of integer fields. Can save some memory if you don't need
full 32 bits for the value.
optional .IntSize int_size = 7 [default = IS_DEFAULT];
Link copied to clipboard
open fun getLongNames(): Boolean
Use long names for enums, i.e. EnumName_EnumValue.
optional bool long_names = 4 [default = true];
Link copied to clipboard
Shorten or remove package names from type names.
This option applies only on the file level.
optional .TypenameMangling mangle_names = 17 [default = M_NONE];
Link copied to clipboard
open fun getMaxCount(): Int
Allocated number of entries in arrays ('repeated' fields)
optional int32 max_count = 2;
Link copied to clipboard
open fun getMaxLength(): Int
Maximum length for 'string' fields. Setting this is equivalent
to setting max_size to a value of length+1.
optional int32 max_length = 14;
Link copied to clipboard
open fun getMaxSize(): Int
Allocated size for 'bytes' and 'string' fields.
For string fields, this should include the space for null terminator.
optional int32 max_size = 1;
Link copied to clipboard
open fun getMsgid(): Int
integer type tag for a message
optional uint32 msgid = 9;
Link copied to clipboard
open fun getNoUnions(): Boolean
Generate oneof fields as normal optional fields instead of union.
optional bool no_unions = 8 [default = false];
Link copied to clipboard
open fun getPackage(): String
Package name that applies only for nanopb.
optional string package = 25;
Link copied to clipboard
open fun getPackageBytes(): ByteString
Package name that applies only for nanopb.
optional string package = 25;
Link copied to clipboard
Add 'packed' attribute to generated enums.
optional bool packed_enum = 10 [default = false];
Link copied to clipboard
Add 'packed' attribute to generated structs.
Note: this cannot be used on CPUs that break on unaligned
accesses to variables.
optional bool packed_struct = 5 [default = false];
Link copied to clipboard
Link copied to clipboard
open fun getProto3(): Boolean
Proto3 singular field does not generate a "has_" flag
optional bool proto3 = 12 [default = false];
Link copied to clipboard
Force proto3 messages to have no "has_" flag.
This was default behavior until nanopb-0.4.0.
optional bool proto3_singular_msgs = 21 [default = false];
Link copied to clipboard
Link copied to clipboard
Skip this message
optional bool skip_message = 6 [default = false];
Link copied to clipboard
open fun getSortByTag(): Boolean
Due to historical reasons, nanopb orders fields in structs by their tag number
instead of the order in .proto. Set this to false to keep the .proto order.
The default value will probably change to false in nanopb-0.5.0.
optional bool sort_by_tag = 28 [default = true];
Link copied to clipboard
Generate message-level callback that is called before decoding submessages.
This can be used to set callback fields for submsgs inside oneofs.
optional bool submsg_callback = 22 [default = false];
Link copied to clipboard
Force type of field (callback or static allocation)
optional .FieldType type = 3 [default = FT_DEFAULT];
Link copied to clipboard
open fun getTypeOverride(): DescriptorProtos.FieldDescriptorProto.Type
Override type of the field in generated C code. Only to be used with related field types
optional .google.protobuf.FieldDescriptorProto.Type type_override = 27;
Link copied to clipboard
decode oneof as anonymous union
optional bool anonymous_oneof = 11 [default = false];
Link copied to clipboard
Data type for storage associated with callback fields.
optional string callback_datatype = 18 [default = "pb_callback_t"];
Link copied to clipboard
Callback function used for encoding and decoding.
Prior to nanopb-0.4.0, the callback was specified in per-field pb_callback_t
structure. This is still supported, but does not work inside e.g. oneof or pointer
fields. Instead, a new method allows specifying a per-message callback that
will be called for all callback fields in a message type.
optional string callback_function = 19 [default = "pb_default_field_callback"];
Link copied to clipboard
Set default value for has_ fields.
optional bool default_has = 23 [default = false];
Link copied to clipboard
Select the size of field descriptors. This option has to be defined
for the whole message, not per-field. Usually automatic selection is
ok, but if it results in compilation errors you can increase the field
size here.
optional .DescriptorSize descriptorsize = 20 [default = DS_AUTO];
Link copied to clipboard
Generate an enum->string mapping function (can take up lots of space).
optional bool enum_to_string = 13 [default = false];
Link copied to clipboard
Set the FT_DEFAULT field conversion strategy.
A field that can become a static member of a c struct (e.g. int, bool, etc)
will be a a static field.
Fields with dynamic length are converted to either a pointer or a callback.
optional .FieldType fallback_type = 29 [default = FT_CALLBACK];
Link copied to clipboard
Generate repeated field with fixed count
optional bool fixed_count = 16 [default = false];
Link copied to clipboard
Generate bytes arrays with fixed length
optional bool fixed_length = 15 [default = false];
Link copied to clipboard
open fun hashCode(): Int
Link copied to clipboard
open fun hasIntSize(): Boolean
Size of integer fields. Can save some memory if you don't need
full 32 bits for the value.
optional .IntSize int_size = 7 [default = IS_DEFAULT];
Link copied to clipboard
open fun hasLongNames(): Boolean
Use long names for enums, i.e. EnumName_EnumValue.
optional bool long_names = 4 [default = true];
Link copied to clipboard
Shorten or remove package names from type names.
This option applies only on the file level.
optional .TypenameMangling mangle_names = 17 [default = M_NONE];
Link copied to clipboard
open fun hasMaxCount(): Boolean
Allocated number of entries in arrays ('repeated' fields)
optional int32 max_count = 2;
Link copied to clipboard
open fun hasMaxLength(): Boolean
Maximum length for 'string' fields. Setting this is equivalent
to setting max_size to a value of length+1.
optional int32 max_length = 14;
Link copied to clipboard
open fun hasMaxSize(): Boolean
Allocated size for 'bytes' and 'string' fields.
For string fields, this should include the space for null terminator.
optional int32 max_size = 1;
Link copied to clipboard
open fun hasMsgid(): Boolean
integer type tag for a message
optional uint32 msgid = 9;
Link copied to clipboard
open fun hasNoUnions(): Boolean
Generate oneof fields as normal optional fields instead of union.
optional bool no_unions = 8 [default = false];
Link copied to clipboard
open fun hasPackage(): Boolean
Package name that applies only for nanopb.
optional string package = 25;
Link copied to clipboard
Add 'packed' attribute to generated enums.
optional bool packed_enum = 10 [default = false];
Link copied to clipboard
Add 'packed' attribute to generated structs.
Note: this cannot be used on CPUs that break on unaligned
accesses to variables.
optional bool packed_struct = 5 [default = false];
Link copied to clipboard
open fun hasProto3(): Boolean
Proto3 singular field does not generate a "has_" flag
optional bool proto3 = 12 [default = false];
Link copied to clipboard
Force proto3 messages to have no "has_" flag.
This was default behavior until nanopb-0.4.0.
optional bool proto3_singular_msgs = 21 [default = false];
Link copied to clipboard
Skip this message
optional bool skip_message = 6 [default = false];
Link copied to clipboard
open fun hasSortByTag(): Boolean
Due to historical reasons, nanopb orders fields in structs by their tag number
instead of the order in .proto. Set this to false to keep the .proto order.
The default value will probably change to false in nanopb-0.5.0.
optional bool sort_by_tag = 28 [default = true];
Link copied to clipboard
Generate message-level callback that is called before decoding submessages.
This can be used to set callback fields for submsgs inside oneofs.
optional bool submsg_callback = 22 [default = false];
Link copied to clipboard
open fun hasType(): Boolean
Force type of field (callback or static allocation)
optional .FieldType type = 3 [default = FT_DEFAULT];
Link copied to clipboard
Override type of the field in generated C code. Only to be used with related field types
optional .google.protobuf.FieldDescriptorProto.Type type_override = 27;
Link copied to clipboard
Link copied to clipboard
open fun parseDelimitedFrom(input: InputStream, extensionRegistry: ExtensionRegistryLite): Nanopb.NanoPBOptions
Link copied to clipboard
open fun parseFrom(data: ByteString): Nanopb.NanoPBOptions
open fun parseFrom(input: CodedInputStream): Nanopb.NanoPBOptions
open fun parseFrom(data: Array<Byte>, extensionRegistry: ExtensionRegistryLite): Nanopb.NanoPBOptions
open fun parseFrom(data: ByteString, extensionRegistry: ExtensionRegistryLite): Nanopb.NanoPBOptions
open fun parseFrom(input: CodedInputStream, extensionRegistry: ExtensionRegistryLite): Nanopb.NanoPBOptions
open fun parseFrom(input: InputStream, extensionRegistry: ExtensionRegistryLite): Nanopb.NanoPBOptions
open fun parseFrom(data: ByteBuffer, extensionRegistry: ExtensionRegistryLite): Nanopb.NanoPBOptions
Link copied to clipboard
open fun parser(): Parser<Nanopb.NanoPBOptions>
Link copied to clipboard
Link copied to clipboard
open fun writeTo(output: CodedOutputStream)